<!--    -->
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!--    -->
<!doctype html>  
<html>  
<head>
<meta charset="UTF-8"/>
<title>Learn JAVA - Home</title>
<link rel="icon" href="images/favicon.gif" type="image/x-icon"/>
 <!--[if lt IE 9]>
 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->

<link rel="shortcut icon" href="images/favicon.gif" type="image/x-icon"/> 
<link rel="stylesheet" type="text/css" href="css/common_styles.css"/>
<link rel="stylesheet" type="text/css" href="css/pages_styles.css"/>

		

</head>
<body>

		<!-- start header -->
		<div id="header">
			<a href="/index" id="logo"><img src="images/logo1.png" width="221" height="100" alt="logo"/></a>
			<div class="login_corner">
				<c:if test="${pageContext.request.remoteUser == null}">
					<a href="/login">Login</a>
				</c:if>
				<c:if test="${pageContext.request.remoteUser != null}">
					Привет, <c:out value="${pageContext.request.remoteUser}"/>!
				</c:if>
				<!--
				<sec:authorize ifAllGranted="ROLE_SUPERVISOR">
				USER: <c:out value="${pageContext.request.remoteUser}"/>
				</sec:authorize>
				-->
			</div>
			<ul>
				<c:forEach items="${menu}" var="menuItem">
				<li>${menuItem}</li>
				</c:forEach>
				<!--  For testing:
				<li><a href="/index">Главная</a></li>
				<li><a href="/lessons" class="current">Учить Джаву</a></li>
				-->
			</ul>
		</div>
		<!-- end header -->
		
		
		<!-- start line separator -->
		<div id="line_separator"><br/></div>
		<!-- end line separator -->
		
		
		
		<!-- start content -->
		<div id="content">
			<div id="group_lessons_left">
				<div class="group_login_left">
				
					<div class="login-type">
						Вход через свой аккаунт:
					</div>
					<c:url value="login" var="loginUrl"/>
					<form:form name="f" action="${loginUrl}" method="post"> 
						<c:if test="${param.error != null}"> 
							<div class="login-alert-error">
								Invalid username and password!
							</div>
						</c:if>
						<c:if test="${param.logout != null}"> 
							<div class="login-alert-success">
								You have been logged out.
							</div>
						</c:if>
						
						<div class="field">
						   <label for="n">Username</label>
						   <input type="text" id="username" name="username"/><br/>
						</div>
						<div class="field">
						   <label for="ln">Password</label>
						   <input type="password" id="password" name="password" width="100"/>
						</div>
						<div class="login-button">
							<button type="submit" class="btn">&nbsp;&nbsp;&nbsp;Log in&nbsp;&nbsp;&nbsp;</button>
						</div>
					</form:form>
					
					</br>
					<div class="login-type">
						Нет аккаунта?
					</div>
					<div class="registration">
						<h3><a href="/registration">&nbsp;&nbsp;&nbsp;Регистрация&nbsp;&nbsp;&nbsp;</a></h3>
					</div>
					
				</div>
			</div>
			<div id="group_lessons_right">
				<div class="group_login_right">
					<div class="login-type">
						Вход через социальные сети:
					</div>
					<div class="login_social">
						Войти через Facebook 
						<a href="/login_fb" id="login_fb">
							<img src="images/big_fb_login.png" width="80" height="80" alt="fb"/>
						</a>
					</div>
					<div class="login_social">
						Войти через VKontakte
						<a href="/login_fb" id="login_fb">
							<img src="images/big_vk_login.png" width="80" height="80" alt="vk"/>
						</a>
					</div>

				</div>
			</div>
				
				
		</div>
		<!-- end content -->
		
		
		<!-- start footer -->
		<div id="footer">
			<div id="FooterOne"> Designed and powered by <a href="mailto:atomix@kievnet.com.ua">atomix@kievnet.com.ua</a>   </div> 
			<div id="FooterTwo"> © 2013 Learn Java </div>
		</div>
		<!-- end footer -->
		<br/>
</body>
</html>